﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Mycontrol_right_menu : System.Web.UI.UserControl
{
    int i = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        rpt_tin_cha.ItemDataBound += new RepeaterItemEventHandler(rpt_tin_chua_ItemDataBound);
        Tin tin = new Tin();
        rpt_tin_cha.DataSource = tin.getTinType(Constants.RIGHT_MENU);
        rpt_tin_cha.DataBind();
    }

    void rpt_tin_chua_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        i++;
        string id = DataBinder.Eval(e.Item.DataItem, "tin_id").ToString() ;
        Repeater rpt =(Repeater) e.Item.FindControl("rpt_tin");
        Tin tin = new Tin();
       
            rpt.DataSource = tin.getTinByTinChaId(id);
            rpt.DataBind();
       
    }
}